package com.zhao.leaf;

import com.zhao.component.MenuComponent;

public class MenuItem extends MenuComponent {

    public MenuItem(String name, Integer level) {
        super.name = name;
        super.level = level;
    }

    @Override
    public void print() {
        for (Integer i = 0; i < level; i++) {
            System.out.print("-");
        }
        System.out.println(name);
    }
}
